package com.easybuy.serviceimpl;

import java.util.ArrayList;
import java.util.List;

import com.easubuy.util.Product_CategoryVo;
import com.easybuy.dao.Product_categoryDao;
import com.easybuy.daoimpl.Product_categoryDaoImpl;
import com.easybuy.entily.Product_category;
import com.easybuy.service.Product_categoryService;

public class Product_categoryServiceImpl implements Product_categoryService {
	Product_categoryDao pc = new Product_categoryDaoImpl();

	@Override
	public List<Product_category> getAll() {// ��ѯ1������
		// TODO Auto-generated method stub
		Product_categoryDao pc = new Product_categoryDaoImpl();
		return pc.getAll();
	}

	@Override
	public List<Product_category> getAll2(int parentId,int type) {// 2及菜單
		// TODO Auto-generated method stub
		Product_categoryDao pc = new Product_categoryDaoImpl();
		return pc.getAll2(parentId,type);
	}

	@Override
	public List<Product_category> getAll3(int parentId,int type) {// ��ѯ3������
		// TODO Auto-generated method stub
		Product_categoryDao pc = new Product_categoryDaoImpl();
		return pc.getAll3(parentId,type);
	}

	@Override
	public int addNews(Product_category pro) {// ���
		// TODO Auto-generated method stub
		Product_categoryDao pc = new Product_categoryDaoImpl();
		return pc.addNews(pro);
	}

	@Override
	public int delNewsInfo(int id) {// ɾ��
		// TODO Auto-generated method stub
		Product_categoryDao pc = new Product_categoryDaoImpl();
		return pc.delNewsInfo(id);
	}

	@Override
	public List<Product_category> All() {// ��Ʒ����
		// TODO Auto-generated method stub
		Product_categoryDao pc = new Product_categoryDaoImpl();
		return pc.All();
	}

	@Override
	public int updateNewsInfo(Product_category pca) {
		// TODO Auto-generated method stub
		Product_categoryDao pc = new Product_categoryDaoImpl();
		return pc.updateNewsInfo(pca);
	}

	

	@Override
	public List<Product_CategoryVo> queryAllProductCategory() {
		//查询一级分类的列表
		
		//查询一级分类
		return null;
	}

	@Override
	public List<Product_category> queryAllProductCategory(int parentid) {
		// TODO Auto-generated method stub
		return pc.queryAllProductCategory(parentid);
	}

}
